Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change normalize to a dynamic import #3006

Merged
merged 1 commit into from
Oct 2, 2023
Merged

Conversation

jxom
Copy link
Member

@jxom jxom commented Sep 13, 2023

Description

Seems that synchronously importing normalize causes runtime side-effects to leak into initial page load: https://github.com/adraffy/ens-normalize.js/blob/main/src/lib.js#L172

h/t to @saihaj for identifying the perf bottleneck: https://github.com/saihaj/wagmi-performance-profiling

Additional Information

Your ENS/address: jxom.eth

@changeset-bot
Copy link

changeset-bot bot commented Sep 13, 2023

🦋 Changeset detected

Latest commit: c79c376

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@wagmi/core Patch
wagmi Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Updated (UTC)
wagmi ⬜️ Ignored (Inspect) Sep 13, 2023 11:40pm
wagmi-v2 ⬜️ Ignored (Inspect) Sep 13, 2023 11:40pm

@github-actions
Copy link
Contributor

Size Change: -16 B (0%)

Total Size: 96.9 kB

Filename Size Change
packages/core/dist/chains.d.ts 10.4 kB +10.3 kB (+9145%) 🆘
packages/core/dist/chains.js 113 B +16 B (+16%) ⚠️
packages/core/dist/chunk-4E64EZ7V.js 97 B -12 B (-11%) 👏
packages/core/dist/chunk-BVC4KGLQ.js 332 B -10.1 kB (-97%) 🏆
packages/core/dist/chunk-EQOEZP46.js 0 B -332 B (removed) 🏆
packages/core/dist/chunk-KFW652VN.js 78 B +78 B (new file) 🆕
packages/core/dist/chunk-LAFZBYO7.js 0 B -78 B (removed) 🏆
packages/core/dist/internal/index.d.ts 1.73 kB -1 B (0%)
packages/core/dist/chunk-7A5QORBY.js 109 B +109 B (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
packages/cli/dist 380 B 0 B
packages/cli/dist/chunk-3XEDX7DR.js 481 B 0 B
packages/cli/dist/chunk-4SLKODV3.js 150 B 0 B
packages/cli/dist/chunk-72RMV4XG.js 150 B 0 B
packages/cli/dist/chunk-UICA3PK6.js 2.13 kB 0 B
packages/cli/dist/chunk-YCU4E2TD.js 40 B 0 B
packages/cli/dist/cli.d.ts 1.4 kB 0 B
packages/cli/dist/cli.js 3.47 kB 0 B
packages/cli/dist/commands-YWOA5TKS.js 1.18 kB 0 B
packages/cli/dist/config-6e2b110a.d.ts 145 B 0 B
packages/cli/dist/config.d.ts 104 B 0 B
packages/cli/dist/config.js 381 B 0 B
packages/cli/dist/index.d.ts 150 B 0 B
packages/cli/dist/index.js 0 B 0 B 🆕
packages/cli/dist/plugins 3.32 kB 0 B
packages/cli/dist/plugins/index.d.ts 9.4 kB 0 B
packages/cli/dist/plugins/index.js 1.36 kB 0 B
packages/connectors/dist 2.71 kB 0 B
packages/connectors/dist/base-70e3a8a9.d.ts 198 B 0 B
packages/connectors/dist/chunk-2UFLHRLT.js 239 B 0 B
packages/connectors/dist/chunk-OQILYQDO.js 637 B 0 B
packages/connectors/dist/chunk-UGBGYVBH.js 726 B 0 B
packages/connectors/dist/chunk-W65LBPLT.js 1.78 kB 0 B
packages/connectors/dist/coinbaseWallet.d.ts 307 B 0 B
packages/connectors/dist/coinbaseWallet.js 165 B 0 B
packages/connectors/dist/index.d.ts 964 B 0 B
packages/connectors/dist/index.js 117 B 0 B
packages/connectors/dist/injected.d.ts 758 B 0 B
packages/connectors/dist/injected.js 1.98 kB 0 B
packages/connectors/dist/ledger.d.ts 513 B 0 B
packages/connectors/dist/ledger.js 1.29 kB 0 B
packages/connectors/dist/metaMask.d.ts 0 B 0 B 🆕
packages/connectors/dist/metaMask.js 803 B 0 B
packages/connectors/dist/mock 1.6 kB 0 B
packages/connectors/dist/mock/index.d.ts 736 B 0 B
packages/connectors/dist/mock/index.js 1.15 kB 0 B
packages/connectors/dist/safe.d.ts 1.65 kB 0 B
packages/connectors/dist/safe.js 2.7 kB 0 B
packages/connectors/dist/walletConnect.d.ts 503 B 0 B
packages/connectors/dist/walletConnect.js 1.74 kB 0 B
packages/connectors/dist/walletConnectLegacy.d.ts 61 B 0 B
packages/connectors/dist/walletConnectLegacy.js 61 B 0 B
packages/core/dist 99 B 0 B
packages/core/dist/chunk-MQXBDTVK.js 130 B 0 B
packages/core/dist/connectors 104 B 0 B
packages/core/dist/connectors/coinbaseWallet.d.ts 104 B 0 B
packages/core/dist/connectors/coinbaseWallet.js 81 B 0 B
packages/core/dist/connectors/index.d.ts 100 B 0 B
packages/core/dist/connectors/index.js 71 B 0 B
packages/core/dist/connectors/injected.d.ts 122 B 0 B
packages/core/dist/connectors/injected.js 83 B 0 B
packages/core/dist/connectors/ledger.d.ts 124 B 0 B
packages/core/dist/connectors/ledger.js 87 B 0 B
packages/core/dist/connectors/metaMask.d.ts 108 B 0 B
packages/core/dist/connectors/metaMask.js 89 B 0 B
packages/core/dist/connectors/mock.d.ts 120 B 0 B
packages/core/dist/connectors/mock.js 71 B 0 B
packages/core/dist/connectors/safe.d.ts 126 B 0 B
packages/core/dist/connectors/safe.js 78 B 0 B
packages/core/dist/connectors/walletConnect.d.ts 132 B 0 B
packages/core/dist/connectors/walletConnect.js 374 B 0 B
packages/core/dist/connectors/walletConnectLegacy.d.ts 7.5 kB 0 B
packages/core/dist/connectors/walletConnectLegacy.js 559 B 0 B
packages/core/dist/index-e744bbc2.d.ts 0 B 0 B 🆕
packages/core/dist/index.d.ts 423 B 0 B
packages/core/dist/index.js 131 B 0 B
packages/core/dist/internal 2.17 kB 0 B
packages/core/dist/internal/index.js 0 B 0 B 🆕
packages/core/dist/internal/test.d.ts 265 B 0 B
packages/core/dist/internal/test.js 297 B 0 B
packages/core/dist/providers 263 B 0 B
packages/core/dist/providers/alchemy.d.ts 294 B 0 B
packages/core/dist/providers/alchemy.js 243 B 0 B
packages/core/dist/providers/infura.d.ts 281 B 0 B
packages/core/dist/providers/infura.js 163 B 0 B
packages/core/dist/providers/jsonRpc.d.ts 186 B 0 B
packages/core/dist/providers/jsonRpc.js 123 B 0 B
packages/core/dist/providers/public.d.ts 20 B 0 B
packages/core/dist/providers/public.js 586 B 0 B
packages/core/dist/window.d.ts 342 B 0 B
packages/core/dist/window.js 61 B 0 B
packages/react/dist 75 B 0 B
packages/react/dist/actions.d.ts 0 B 0 B 🆕
packages/react/dist/actions.js 83 B 0 B
packages/react/dist/chains.d.ts 120 B 0 B
packages/react/dist/chains.js 80 B 0 B
packages/react/dist/connectors 107 B 0 B
packages/react/dist/connectors/coinbaseWallet.d.ts 67 B 0 B
packages/react/dist/connectors/coinbaseWallet.js 112 B 0 B
packages/react/dist/connectors/index.d.ts 75 B 0 B
packages/react/dist/connectors/index.js 113 B 0 B
packages/react/dist/connectors/injected.d.ts 77 B 0 B
packages/react/dist/connectors/injected.js 116 B 0 B
packages/react/dist/connectors/ledger.d.ts 73 B 0 B
packages/react/dist/connectors/ledger.js 111 B 0 B
packages/react/dist/connectors/metaMask.d.ts 93 B 0 B
packages/react/dist/connectors/metaMask.js 111 B 0 B
packages/react/dist/connectors/mock.d.ts 76 B 0 B
packages/react/dist/connectors/mock.js 117 B 0 B
packages/react/dist/connectors/safe.d.ts 83 B 0 B
packages/react/dist/connectors/safe.js 123 B 0 B
packages/react/dist/connectors/walletConnect.d.ts 7.66 kB 0 B
packages/react/dist/connectors/walletConnect.js 9.44 kB 0 B
packages/react/dist/connectors/walletConnectLegacy.d.ts 0 B 0 B 🆕
packages/react/dist/connectors/walletConnectLegacy.js 75 B 0 B
packages/react/dist/index.d.ts 113 B 0 B
packages/react/dist/index.js 74 B 0 B
packages/react/dist/providers 111 B 0 B
packages/react/dist/providers/alchemy.d.ts 75 B 0 B
packages/react/dist/providers/alchemy.js 113 B 0 B
packages/react/dist/providers/infura.d.ts 74 B 0 B
packages/react/dist/providers/infura.js 111 B 0 B
packages/react/dist/providers/jsonRpc.d.ts 597 B 0 B
packages/react/dist/providers/jsonRpc.js 34 B 0 B
packages/react/dist/providers/public.d.ts 0 B 0 B 🆕
packages/react/dist/providers/public.js 0 B 0 B 🆕
packages/react/dist/window.d.ts 0 B 0 B 🆕
packages/react/dist/window.js 0 B 0 B 🆕

compressed-size-action

@jxom jxom merged commit f2ddce2 into main Oct 2, 2023
6 of 7 checks passed
@jxom jxom deleted the jxom/dynamic-import-normalize branch October 2, 2023 20:12
@github-actions github-actions bot mentioned this pull request Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants